<div id="actionbar" class="fn-clear">
    <div class="fn-right">
        <form id="form" action="{:url('card/selectStore')}" method="get" class="input-group">
            <input type="hidden" name="input" value="{$input}" />
            <input placeholder="请输入好店名称" class="input w200 ext-select" type="text" name="keyword" value="{$keyword}" />
            <input type="submit" value="搜索" class="button button-blue" />
        </form>
    </div>
</div>
<table class="table table-border">
    <thead>
        <tr>
            <th class="w100 fn-tac">#</th>
            <th class="w60 fn-tac"></th>
            <th>好店名称</th>
            <th class="w140">联系电话</th>
            <th class="w140">更新时间</th>
        </tr>
    </thead>
    <tbody>
        {foreach $lists as $vo}
        <tr>
            <td class="fn-tac"><a href="javascript:;" class="button selectStore" title="选择" data-id="{$vo.id}"><i class="iconfont icon-text_icon"></i>选择</a></td>
            <td class="fn-tac"><img src="{$vo.img}?x-oss-process=style/80" class="w40" /></td>
            <td>
                <i class="iconfont icon-home_icon"></i> <a href="javascript:;" class="win" url="{:url('store/review',['id'=>$vo.id])}">{$vo.name}</a>
                {if $vo.is_top}<span class="badge bg-green">置顶</span>{else}<span class="badge">置顶</span>{/if}
                {if $vo.is_default}<span class="badge bg-blue">默认</span>{else}<span class="badge">默认</span>{/if}
                {if $vo.is_lock}<span class="badge bg-red">锁定</span>{else}<span class="badge">锁定</span>{/if}<br />
                <i class="iconfont icon-address_icon"></i><span class="gray">{$vo.address}</span>
            </td>
            <td>{$vo.telphone}</td>
            <td>{$vo.create_time|date='Y-m-d H:i'}</td>
        </tr>
        {/foreach}
    </tbody>
</table>
{$lists|raw}
<script type="text/javascript">
Do('base','layer',function(){
    $(".win").win({reload:1});
    var index = parent.layer.getFrameIndex(window.name);
    $('.selectStore').click(function(){
        parent.$("#iframe").contents().find("#{$input}").val($(this).attr('data-id'));  
        parent.layer.close(index); 
    });
})
</script>